import request from '../utils/request'

// 获取评论列表
export const getComment = params => {
    return request({
        method:'get',
        url: '/v1_0/comments',
        params
    })
}

// 点赞评论
export const addZan = target => {
    return request({
        method:'POST',
        url: '/v1_0/article/likings',
        data: {
            target
        }
    })
}

// 取消点赞评论
export const delZan = target => {
    return request({
        method:'delete',
        url: `/v1_0/article/likings/${target}`,
        
    })
}

// 发布评论
export const addPing = target => {
    return request({
        method:'POST',
        url: `/v1_0/comments`,
        data:target
        
    })
}